<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
    <style type="text/css">
        #d_tag2 { position:absolute; z-index:1111; float:left; left:4px; top:2px;  
	          font-size:12px;
              font-family:Verdana, "Lucida Grande", Arial, Helvetica, sans-serif; }
      #txtTag3 { position:absolute; z-index:-1; float:left; left:4px; top:2px;   
	          font-size:12px;
              font-family:Verdana, "Lucida Grande", Arial, Helvetica, sans-serif; }
	  #d_tag2 span { cursor:default; display:inline-block; border:solid 1px #ccc; background-color:#ffffcc; border-radius:5px; padding:2px 4px; margin-right:4px;}
    </style>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/seriesComboBoxs/jquery.seriesComboBoxs.js" charset="utf-8"></script>
    <link href="${pageContext.request.contextPath}/js/scroll/mCustomScrollbar.css" rel="stylesheet" /> 
	<script type="text/javascript" src="${pageContext.request.contextPath}/js/scroll/mCustomScrollbar.concat.min.js"></script> 
	<script type="text/javascript">
	 $(document).ready(function(){
		 //增加隔行变色效果
   	    $(".listtable").zebra();
		 
   	 	showFileList(); 
	 });
	 
	  //显示附件列表
	    function showFileList() {
	   		//刷新页面  problemmgr
	   		$('#table_datagrid').datagrid({
	   			url:'${pageContext.request.contextPath}/upload/fileAction!toListUploadFiles.action',
	   			queryParams:{
	   				"bussId" : '${knowledge.knowledgeId}',
	   				"bussType":"1"	
	   			},
	   			fit:true,
	   			border:false,
	   			fitColumns:true,
	   			pagination:false,
	   			pageList:[10,20,30],
	   			rownumbers:false,
	   			singleSelect:true,                   
	   			autoRowHeight:true,
	   			sortName:'uploadTime',
	   			sortOrder:'asc', 
	   			columns:[[{
	   				field:'fileName',
	   				title:'附件名称',
	   				width:200
	   			},{
	   				field:'uploadUserName',
	   				title:'上传人',
	   				width:60
	   			 },{
	   				field:'fileSize',
	   				title:'附件大小',
	   				width:60
	   			 },{
	   				field:'uploadTime',
	   				title:'上传时间',
	   				width:150
	   			},{
	   				field:'fileId',
	   				title:'操作',
	   				width:150,
	   				align:'center', formatter: function (fileId,rowData,rowIndex){ 
	   					return '<span  style="cursor:pointer" onclick="downLoadFile(\''+fileId+'\')"><img onclick="downLoadFile(\''+fileId+'\')" src="${pageContext.request.contextPath}/images/icons/downFile.png" title="下载" alt="下载"/>下载</span>';
	   				}
	   			}]],
	   		});  
	   		
	   		
	   		$("#knowledgeDescDiv").mCustomScrollbar({ 
				theme: "light-thick",
				scrollInertia:0,
				autoDraggerLength:true,
				scrollButtons:{
					enable:false
				}
			});
	   		
	   		$("#solutionDiv").mCustomScrollbar({  
				theme: "light-thick",
				scrollInertia:0,
				autoDraggerLength:true,
				scrollButtons:{
					enable:false
				}
			});
	   	}
	    //附件下载
		function downLoadFile(fileId){
			$("#fileDownFrame").attr("src","${pageContext.request.contextPath}/upload/fileAction!toDownLoadFile.action?fileId="+fileId);
		}
	</script>
	 <!-- 新建知识库 -->
   <div class="easyui-tabs" style="width:auto;height:495px">
	<div title="基本信息" style="padding:0px">
		 <!-- 查看知识库 --> 
  <form id="knowledge_modify_form" method="post">
      <table border="0" cellpadding="0" cellspacing="0" height="100%"  width="100%" class="listtable">
		<tr> 
		    <td  style="text-align:right;color:#398ece;font-weight:600;width:105px;height:40px;">知识名称:&nbsp;</td> 
			<td  width="140px" colspan="3">${knowledge.knowledgeName}</td>
		</tr>
		<tr>
			<td style="text-align:right;color:#398ece;font-weight:600;width:105px;height:40px;">一级知识类型:&nbsp;</td>
			<td style="height:40px;">${knowledge.knowledgeOneTypeName}</td> 
			<td style="text-align:right;color:#398ece;font-weight:600;width:105px;height:40px;">二级知识类型:&nbsp;</td>
			<td style="height:40px;">${knowledge.knowledgeTwoTypeName}</td> 
		</tr>
		<tr> 
			<td style="text-align:right;color:#398ece;font-weight:600;width:105px;height:40px;">关键词:&nbsp;</td>
			<td colspan="3">${knowledge.keyWord}</td>
		</tr>
		 
		<tr>
			<td style="width:110px;text-align:right;height:164px;color:#398ece;font-weight:600;vertical-align:top;padding-top:8px;">知识描述:&nbsp;</td>
			<td  colspan="3">
				<div id="knowledgeDescDiv" style="width:633px;padding-top:7px;line-height: 15px;height:165px;word-wrap:break-word;">${knowledge.knowledgeDesc}</div>
			</td>  
		</tr>  
		<tr>    
			<td style="width:110px;text-align:right;height:164px;color:#398ece;font-weight:600;vertical-align:top;padding-top:8px;">解决方案:&nbsp;</td> 
			<td  colspan="3">  
				<div id="solutionDiv" style="width:633px;padding-top:7px;line-height: 15px;height:165px;word-wrap:break-word;">${knowledge.solution}</div>
			</td> 
		</tr> 
     </table>
   </form>  
	</div>
	<div title="附件信息" style="padding:0px">
		<div data-options="region:'center'" style="height:300px;widht:100%">  
	          <table id="table_datagrid" style="height:auto" >
			 </table> 
	      </div>  
		<iframe id="fileDownFrame" src="" style="display:none; visibility:hidden;"></iframe> 
	</div>
	</div>
   
